package io.renren.modules.generator.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.generator.dao.DepartmentDao;
import io.renren.modules.generator.entity.DepartmentEntity;
import io.renren.modules.generator.service.DepartmentService;



@Service("departmentService")
public class DepartmentServiceImpl extends BaseServiceImpl implements DepartmentService {
	
	@Override
	public DepartmentEntity queryObject(String departmentno){
		return departmentDao.queryObject(departmentno);
	}
	
	@Override
	public List<DepartmentEntity> queryList(Map<String, Object> map){
		return departmentDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return departmentDao.queryTotal(map);
	}
	
	@Override
	public void save(DepartmentEntity department){
		departmentDao.save(department);
	}
	
	@Override
	public void update(DepartmentEntity department){
		departmentDao.update(department);
	}
	
	@Override
	public void delete(String departmentno){
		departmentDao.delete(departmentno);
	}
	
	@Override
	public void deleteBatch(String[] departmentnos){
		departmentDao.deleteBatch(departmentnos);
	}

	@Override
	public DepartmentEntity departmentByEmployee(String employeeno) {
		DepartmentEntity departmentEntity = new DepartmentEntity();
		departmentEntity.setEmployeeno(employeeno);
		return departmentDao.departmentByEmployee(departmentEntity);
	}
	
}
